package com.auxgroup.smarthome.inner.repo;

import com.auxgroup.smarthome.inner.entity.AppVersionEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

/**
 * Created by lixiaoxiao on 18-3-15.
 */
public interface AppVersionRepo extends JpaRepository<AppVersionEntity,String>,JpaSpecificationExecutor<AppVersionEntity> {

    @Query(value = "SELECT * FROM app_version ORDER BY created_at  desc limit 0,1 ",nativeQuery = true)
    AppVersionEntity findAppVersionEntity();

}
